Modifier Key Mask Constants
You can use one or more of the following mask constants in the modifier keys field of the
'xmnu'
resource
'xmnu'
to determine which modifier key(s) must be pressed along with a character key to create a keyboard equivalent for selecting a menu item. These constants are also passed in and obtained by
SetMenuItemModifiers
and
GetMenuItemModifiers
, respectively. Modifier key mask constants are available with Appearance Manager 1.0 and later.
enum {
kMenuNoModifiers = 0,
kMenuShiftModifier = (1 << 0),
kMenuOptionModifier = (1 << 1),
kMenuControlModifier = (1 << 2),
kMenuNoCommandModifier = (1 << 3)
};
Constant descriptions
-
kMenuNoModifiers
-
If no bit is set, only the Command key is used in the keyboard equivalent.
-
kMenuShiftModifier
-
If this bit (bit 0) is set, the Shift key is used in the keyboard equivalent.
-
kMenuOptionModifier
-
If this bit (bit 1) is set, the Option key is used in the keyboard equivalent.
-
kMenuControlModifier
-
If this bit (bit 2) is set, the Control key is used in the keyboard equivalent.
-
kMenuNoCommandModifier
-
If this bit (bit 3) is set, the Command key is not used in the keyboard equivalent.
© 1998 Apple Computer, Inc. - (Last Updated 19 Nov 98)